package com.example.demo.internettongxin.qunliao;

import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;

/**
 * @Description T3server
 * @Author songchuanlong
 * @Date 2025-05-30
 */
public class T3server {
    public static List<Socket> onLine = new ArrayList<>();
    public static void main(String[] args) throws Exception {
        ServerSocket serverSocket = new ServerSocket(9999);
        while (true) {
            Socket socket = serverSocket.accept();
            onLine.add(socket);
            System.out.println(socket.getRemoteSocketAddress());
            new T3clientReaderthread(socket).start();
        }
    }
}
